Skip to content

feat: CI/CD fixes, documentation, security policy, and release automation#9

Open
0xgetz wants to merge 4 commits intounicitynetwork:mainfrom
0xgetz:main
Open

feat: CI/CD fixes, documentation, security policy, and release automation#9
0xgetz wants to merge 4 commits intounicitynetwork:mainfrom
0xgetz:main

Conversation

@0xgetz
Copy link
Copy Markdown

@0xgetz 0xgetz commented Apr 16, 2026

Summary

This pull request consolidates four commits of improvements across CI/CD, documentation, security, and release automation:

1. Fix sanitizer flags + macOS CI + ASan/UBSan jobs

  • Fixed compiler sanitizer flags to resolve build failures
  • Added macOS CI support to the GitHub Actions workflow
  • Introduced dedicated AddressSanitizer (ASan) and UndefinedBehaviorSanitizer (UBSan) CI jobs for improved runtime safety checking

2. Add SECURITY.md + CONTRIBUTING.md + issue/PR templates

  • Added SECURITY.md with a vulnerability disclosure and security policy
  • Added CONTRIBUTING.md with contribution guidelines and developer workflow
  • Added GitHub issue and pull request templates to standardize community contributions

3. Update ARCHITECTURE.md + add CHANGELOG.md

  • Updated ARCHITECTURE.md to reflect current system design and component structure
  • Added CHANGELOG.md to track version history and notable changes going forward

4. Add release automation workflow + Codecov coverage CI

  • Added a GitHub Actions release automation workflow for streamlined versioned releases
  • Integrated Codecov into the CI pipeline for code coverage reporting and tracking

0xgetz added 4 commits April 16, 2026 01:19
…San + functional test jobs

- Fix typo: -DSANITIZE -> -DSANITIZER in pr-ci.yml so AddressSanitizer
  and UBSan are actually enabled in CI (were silently ignored before)
- Pin RandomX GIT_TAG from floating origin/master to specific commit SHA
  051d4424394cf8d1f8d0bfff581f0729f2753341 to eliminate supply chain risk
- Remove GIT_SHALLOW from RandomX fetch (incompatible with pinned SHA)
- Add macOS 14 (Apple Silicon) CI job
- Add Linux Clang 18 ASan and UBSan matrix jobs
- Add functional-tests CI job running Python test suite on every PR
- Make nproc call portable for macOS (nproc || sysctl -n hw.logicalcpu)
- SECURITY.md: responsible disclosure policy, response timeline (48h ack,
  7d assessment, 90d fix), scope definition, node operator best practices
- CONTRIBUTING.md: dev setup, build instructions, sanitizer usage, coding
  standards, test instructions, branch naming, commit message conventions,
  PR/review process
- .github/PULL_REQUEST_TEMPLATE: structured checklist with consensus-impact
  flag requiring two maintainer reviews for consensus-critical changes
- .github/ISSUE_TEMPLATE/bug_report.yml: structured bug report with OS,
  compiler, reproduction steps, and log fields
- .github/ISSUE_TEMPLATE/feature_request.yml: feature proposal with
  problem/solution/alternatives and codebase area dropdown
- .github/ISSUE_TEMPLATE/consensus_issue.yml: dedicated template for
  consensus-critical bugs with impact assessment
- .github/ISSUE_TEMPLATE/config.yml: disable blank issues, link security
  contact to SECURITY.md
- ARCHITECTURE.md: remove stale Orphan Pool component from architecture
  diagram (removed Feb 2026); headers now flow directly into
  ActiveTipCandidates. Update DoS protection section to reference
  candidate tip limits instead of orphan header limits.
- CHANGELOG.md: add Keep a Changelog-format file documenting all changes
  in this PR (Unreleased section) plus a pre-release history summary
  covering the initial development period (Jan-Apr 2026)
- release.yml: triggered on v*.*.* tags; builds Linux x86_64 (GCC +
  Clang) and macOS arm64 binaries with LTO, runs unit tests, packages
  tar.gz with SHA256 checksums, creates GitHub Release with changelog
  notes extracted from CHANGELOG.md; pre-release flag set automatically
  for -alpha/-beta/-rc tags
- coverage.yml: runs on push/PR to main; builds with GCC --coverage flags,
  captures lcov data, filters out system headers and third-party deps,
  generates HTML report artifact, uploads to Codecov with CODECOV_TOKEN
  secret; prints coverage summary to CI log
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request establishes project governance and documentation by adding issue and pull request templates, a security policy, a changelog, and a contributor guide. It also enhances build reproducibility by pinning the RandomX dependency and updates architectural documentation to reflect recent code removals. Review feedback identifies several necessary corrections: fixing broken relative links in issue templates, removing incorrect dependency requirements, improving build command portability for macOS users, and reconciling documentation regarding the use of assertions for consensus invariants.

Thank you for taking the time to file a bug report. Please fill out all sections
to help us reproduce and fix the issue quickly.

**For security vulnerabilities, do NOT use this form.** See [SECURITY.md](../SECURITY.md).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The relative link to SECURITY.md is incorrect. Since this file is located in .github/ISSUE_TEMPLATE/, it needs to go up two levels (../../) to reach the repository root where SECURITY.md resides.

        **For security vulnerabilities, do NOT use this form.** See [SECURITY.md](../../SECURITY.md).

Please provide as much detail as possible.

**If this could be exploited to attack the network, use the private disclosure
process in [SECURITY.md](../SECURITY.md) instead of this public form.**
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The relative link to SECURITY.md is incorrect. It should point to the root of the repository using ../../SECURITY.md.

        process in [SECURITY.md](../../SECURITY.md) instead of this public form.**

Comment thread CONTRIBUTING.md
Comment on lines +40 to +41
- **Boost** (system, filesystem)
- **libminiupnpc**
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Boost is listed as a prerequisite, but the project's CMakeLists.txt (line 143) specifically uses standalone Asio to avoid a Boost dependency. Additionally, libminiupnpc is handled via FetchContent in CMake, so it is not strictly a system prerequisite. The Boost requirement should be removed to avoid confusion for new contributors.

Suggested change
- **Boost** (system, filesystem)
- **libminiupnpc**
- **libminiupnpc**

Comment thread CONTRIBUTING.md

```bash
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j$(nproc)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The nproc command is a GNU utility and is not available by default on macOS. To ensure the build instructions are portable for macOS users (a goal of this PR), use cmake --build build --parallel. This applies to lines 56, 60, and 64 as well.

Suggested change
cmake --build build -j$(nproc)
cmake --build build --parallel

Comment thread CONTRIBUTING.md
```bash
# AddressSanitizer
cmake -B build -DSANITIZER=address -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -j$(nproc)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the portable --parallel flag instead of nproc for macOS compatibility.

Suggested change
cmake --build build -j$(nproc)
cmake --build build --parallel

Comment thread CONTRIBUTING.md

# ThreadSanitizer
cmake -B build -DSANITIZER=thread -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -j$(nproc)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the portable --parallel flag instead of nproc for macOS compatibility.

Suggested change
cmake --build build -j$(nproc)
cmake --build build --parallel

Comment thread CONTRIBUTING.md

# UndefinedBehaviorSanitizer
cmake -B build -DSANITIZER=undefined -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -j$(nproc)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the portable --parallel flag instead of nproc for macOS compatibility.

Suggested change
cmake --build build -j$(nproc)
cmake --build build --parallel

Comment thread CONTRIBUTING.md
- Follow the existing **clang-format** style (run `clang-format -i` before committing)
- Run **clang-tidy** and address all warnings
- Run **cppcheck** for static analysis
- No `assert()` for consensus invariants in release builds — use explicit error handling
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This statement contradicts the project's build configuration. CMakeLists.txt (lines 39-42) explicitly keeps assert() active in all build types (including Release) to guard consensus-critical invariants. The documentation should reflect that asserts are used for invariants.

Suggested change
- No `assert()` for consensus invariants in release builds — use explicit error handling
- Use assert() for consensus invariants (active in all build types) — use explicit error handling for runtime/user errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant